<#include "/macro.include"/>
<#assign className = table.className>   
<#assign classNameLower = className?uncap_first> 
package ${basepackage}.model;
import ${basepackage}.model.BaseEntity;
<#list table.columns as column>
<#if column.javaType?index_of("java.lang")==-1>
import ${column.javaType};
</#if>
</#list>


<#include "/java_copyright.include">
public class ${className}Entity extends BaseEntity {
	<@generateFields/>
	<@generateProperties/>
	
	public String toString() {
		return "${className} [" +
		<#list table.columns as column>
			", ${column.columnName}=" + get${column.columnName}() +
		</#list>
		" ]";
	}
}


<#macro generateFields>

	<#list table.columns as column>
	/** 
	 * ${column.columnAlias} 
	 */
	<#if column.pk>
	private ${column.simpleJavaType} ${column.columnNameLower};
	<#else>
	private ${column.simpleJavaType} ${column.columnNameLower};
	</#if>

	</#list>

</#macro>

<#macro generateProperties>
	<#list table.columns as column>
	public ${column.simpleJavaType} get${column.columnName}() {
		return this.${column.columnNameLower};
	}
	
	public void set${column.columnName}(${column.simpleJavaType} value) {
		this.${column.columnNameLower} = value;
	}
	</#list>
</#macro>





